<?
if(!ANTIHACK) die("ANTIHACK...");
//and parent in (1,2,3,4,5,13,14)
	$q=query("select id,parent,title,image,imgheight,imgwidth,described from post where is_active=1 and parent NOT IN (11,12,15,5,20) order by time desc limit 10");
	$i=0;
	while($r=fetch($q))
	{
		$r['counter']=$i++;
		$r['title']=str_replace('"','“',$r['title']);
		$r['title']=str_replace('\'','“',$r['title']);
		$r["link"]=buildlink("post",$r,"",1);
		$r["described"]=split_unicode(str_replace('"','“',$r["described"]),60);
		$r["described"]=split_unicode(str_replace('\'','“',$r["described"]),60);
		$r["short_title"] = split_unicode($r['title'],30);
		$data[]=$r;
	}
	$data[count($data)-1]["end"]=1;
$smarty->assign("data",$data);
$smarty->display("topnews.htm");
?>